Skip to content

Update plugin 金价动态 v1.0.1#300

Merged
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
fantasy-ke:plugin/gold-price-check
Jul 10, 2026
Merged

Update plugin 金价动态 v1.0.1#300
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
fantasy-ke:plugin/gold-price-check

Conversation

@fantasy-ke

@fantasy-ke fantasy-ke commented Jul 9, 2026

Copy link
Copy Markdown

插件信息

  • 名称: 金价动态
  • 插件ID: gold-price-check
  • 版本: 1.0.1
  • 描述: 实时查看每日金价、品牌金店价格、银行金条价格、黄金回收价格,以及日内/月度/年度价格波动走势
  • 作者: fantasyke
  • 类型: 更新

本次变更

  • Initial commit
  • 优化金价数据获取和处理逻辑,增强错误处理,更新类型检查设置
  • 优化应用加载逻辑,增强 ZTools 环境支持,调整样式以改善布局
  • 新增历年均价对比功能,优化数据获取逻辑,更新数据结构和接口
  • v1.0.1: 优化快照写入机制,修复多天累积后界面加载失败

截图 / 演示

自检清单

  • plugin.json 的 name / title / version / description / author 字段均已检查
  • 已移除调试日志、未使用文件、敏感信息(.env、token、密钥等)
  • 本次 PR 的 diff 仅涉及 plugins/gold-price-check/ 目录
  • 已在本地 ZTools 客户端实际加载并测试过此插件,主要功能正常
  • 同意以仓库声明的开源协议发布此插件

此 PR 由 ztools-plugin-cli 自动管理:每次 ztools publish 在分支上追加一个 commit,PR 链接保持不变。

- Initial commit
- 优化金价数据获取和处理逻辑,增强错误处理,更新类型检查设置
- 优化应用加载逻辑,增强 ZTools 环境支持,调整样式以改善布局
- 新增历年均价对比功能,优化数据获取逻辑,更新数据结构和接口
- v1.0.1: 优化快照写入机制,修复多天累积后界面加载失败
@fantasy-ke fantasy-ke marked this pull request as ready for review July 9, 2026 08:30

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces request cancellation using AbortController, state management optimizations to eliminate useMemo side effects, and a write-throttling mechanism to prevent high-frequency storage writes. The review feedback highlights a race condition in the concurrency locking logic involving loadingRef and recommends relying solely on abortRef. Additionally, the reviewer identified a bug in the monthly snapshot update where a 0.01 threshold check can permanently freeze average price updates when the data count is large.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread plugins/gold-price-check/src/GoldPrice/index.tsx Outdated
Comment thread plugins/gold-price-check/src/GoldPrice/index.tsx Outdated
Comment thread plugins/gold-price-check/src/GoldPrice/index.tsx
Comment thread plugins/gold-price-check/src/GoldPrice/services/goldApi.ts Outdated
- Initial commit
- 优化金价数据获取和处理逻辑,增强错误处理,更新类型检查设置
- 优化应用加载逻辑,增强 ZTools 环境支持,调整样式以改善布局
- 新增历年均价对比功能,优化数据获取逻辑,更新数据结构和接口
- v1.0.1: 优化快照写入机制,修复多天累积后界面加载失败
- fix: 修复并发锁竞态条件和月度均价冻结bug
@lzx8589561 lzx8589561 merged commit 50a913b into ZToolsCenter:main Jul 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants